<template>
	<view>
		<view class="box-flex-center box-flex-column logo-box">
			<image src="@/static/logo.png" mode="aspectFit"></image>
			<view class="text"><text>Jeeidp</text></view>
			<view v-if="version"><text>{{version}}</text></view>
		</view>
		<view class="list-block">
			<view v-if="version" class="box-flex-between list-row" @click="updateVersion">
				<view>版本更新</view>
				<uni-icons type="forward"></uni-icons>
			</view>
			<view class="box-flex-between list-row" @click="toHelp">
				<view>使用帮助</view>
				<uni-icons type="forward"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	// #ifdef APP-PLUS
	import APPUpdate, {
		getCurrentNo
	} from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
	// #endif
	export default {
		data() {
			return {
				version: ''
			};
		},
		onLoad() {
			// #ifdef APP-PLUS
			getCurrentNo(res => {
				this.version = res.versionName;
			});
			// #endif
		},
		methods: {
			updateVersion() {
				APPUpdate(true);
			},
			toHelp() {

			}
		}
	}
</script>

<style lang="scss" scoped>
	.logo-box {
		padding: 50px;

		image {
			width: 75px;
			height: 75px;
		}

		.text {
			padding: 15px;
			color: $uni-main-color;
			font-size: 18px;
			font-weight: 600;
		}
	}
</style>
